package me.mcx.mcx.web.controller;

import me.mcx.common.core.controller.BaseController;
import me.mcx.common.core.domain.AjaxResult;
import me.mcx.mcx.domain.McxRecruitment;
import me.mcx.mcx.service.IMcxRecruitmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 招聘信息Controller
 * 
 * @author mcx
 * @date 2024-09-21
 */
@RestController
@RequestMapping("/api/mcx/recruitment")
public class ApiMcxRecruitmentController extends BaseController
{
    @Autowired
    private IMcxRecruitmentService mcxRecruitmentService;

    /**
     * 查询招聘信息列表
     */
    @GetMapping("/list")
    public AjaxResult list(McxRecruitment mcxRecruitment)
    {
        List<McxRecruitment> list = mcxRecruitmentService.selectMcxRecruitmentList(mcxRecruitment);
        return success(list);
    }

    /**
     * 获取招聘信息详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(mcxRecruitmentService.selectMcxRecruitmentById(id));
    }
}
